import request from '@/utils/request'

export default {
  getDeptList() {
    return request({
      url: '/system/dept/list',
      method: 'get'
    })
  },
  getDeptOptions() {
    return request({
      url: '/system/dept/options',
      method: 'get'
    })
  },
  createDept(data) {
    return request({
      url: '/system/dept/create',
      method: 'post',
      data
    })
  },
  updateDept(data) {
    return request({
      url: `/system/dept/update/${data.id}`,
      method: 'put',
      data
    })
  },
  deleteDept(data) {
    return request({
      url: `/system/dept/delete`,
      method: 'delete',
      data
    })
  }
}
